Skip to content

Rewrite plex recent as a native button View - #48

Merged
brah merged 1 commit into
mainfrom
modernize-recent-pagination
Jun 16, 2026
Merged

Rewrite plex recent as a native button View#48
brah merged 1 commit into
mainfrom
modernize-recent-pagination

Conversation

@brah

@brah brah commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Replace the nextcord.ext.menus pagination (RecentlyAddedPageSource + NoStopButtonMenuPages) with a native nextcord.ui.View, matching the modern pattern already used by RandomMediaView.

This fixes three issues inherent to the ext.menus button retrofit:

  • The reaction-wait internal loop disabled the buttons 60s after the message was posted, even during active use; a View resets its timeout on each interaction.
  • Paging from an item with a poster to one without left the previous poster attached; _show now passes attachments=[] to clear it.
  • The pagination buttons were drivable by anyone; interaction_check now restricts them to the command author.

_show defers the component interaction before fetching the poster so a slow Tautulli image fetch can't blow the 3s ack window, snapshots the index so rapid clicks can't tear the embed, and guards the edit.

ext.menus was used nowhere else, so drop NoStopButtonMenuPages from utilities.py and the now-dead nextcord-ext-menus dependency.

Replace the nextcord.ext.menus pagination (RecentlyAddedPageSource +
NoStopButtonMenuPages) with a native nextcord.ui.View, matching the
modern pattern already used by RandomMediaView.

This fixes three issues inherent to the ext.menus button retrofit:
- The reaction-wait internal loop disabled the buttons 60s after the
  message was posted, even during active use; a View resets its timeout
  on each interaction.
- Paging from an item with a poster to one without left the previous
  poster attached; _show now passes attachments=[] to clear it.
- The pagination buttons were drivable by anyone; interaction_check now
  restricts them to the command author.

_show defers the component interaction before fetching the poster so a
slow Tautulli image fetch can't blow the 3s ack window, snapshots the
index so rapid clicks can't tear the embed, and guards the edit.

ext.menus was used nowhere else, so drop NoStopButtonMenuPages from
utilities.py and the now-dead nextcord-ext-menus dependency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@brah
brah merged commit ebecd05 into main Jun 16, 2026
2 checks passed
@brah
brah deleted the modernize-recent-pagination branch June 16, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant